/*
 * =====================================================================================
 *
 *       Filename:  word.h
 *
 *    Description:  AVL tree node content as word.
 *
 *        Version:  1.0
 *        Created:  2017/02/13 11:20:13
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Brook L. (), Brook_L@163.com
 *   Organization:  
 *
 * =====================================================================================
 */

#ifndef _WORD_H_
#define _WORD_H_

#define MAX_WORD_CHAR    40                     // max number of characters in a word

// <user: avl tree node content, must be defined by user>
typedef struct word {
    char word[MAX_WORD_CHAR];
    int num;
} Word;

// <user: typedef user defined AVL tree node content struct as universal struct, 
// must be modified by user: replace "Word" as the actual defined structure name>
typedef Word AvlNodeContent;

// <user: avl tree callback function, must be implemented by user>
int wordCompare(Word *word1, Word *word2);
void wordInsertMatchProcess(Word *word);
void wordTravProcess(Word *word);

#endif /* #ifnef _WORD_H_ */
